/*
 * @Author: licongwei
 * @Date: 2022-03-17 09:49:14
 * @Description: 按需引入element-plus
 */
import { App } from 'vue'
import 'element-plus/dist/index.css'
import {
  ElScrollbar,
  ElDatePicker,
  ElConfigProvider,
  ElCheckboxGroup,
  ElCheckbox,
  ElSelect,
  ElOption,
  ElButton,
  ElInput,
  ElRow,
  ElCol,
  ElIcon
} from 'element-plus'

const components = [
  ElScrollbar,
  ElDatePicker,
  ElConfigProvider,
  ElCheckboxGroup,
  ElCheckbox,
  ElSelect,
  ElOption,
  ElButton,
  ElInput,
  ElRow,
  ElCol,
  ElIcon
]

function registerElement(app: App): void {
  for (const cpn of components) {
    app.component(cpn.name, cpn)
  }
}

export default registerElement
